
import data.Key;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import manager.ServerTool;
import server.votesending.shamirsecret.GenerateKeysAndSecret;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Agnieszka
 */
public class KeyGen {
    public static void main(String[] args) throws NoSuchAlgorithmException, FileNotFoundException, IOException, BadPaddingException, InterruptedException {
        GenerateKeysAndSecret g=new GenerateKeysAndSecret();
        g.generateKeys(13);
        String pass= g.generateRandomPassword(20);
        ServerTool st= new ServerTool();
        Key pub =new Key();
        pub.setKey(st.getE());
        pub.setKey(st.getN());
        
        //08976707138159620063
        Key pri =new Key();
        pri.setKey(st.getD());
        pri.setKey(st.getN());
        
        g.storeKeysX509("key", 20, 0, 0, "");
    }
}
